#coding:utf8
#
# Author: CMGS
# Created on 2010-12-28
#

# necessary
from gevent import monkey; monkey.patch_socket()
from gevent import wsgi

def hello_world(env, start_response):
#    b = Basic()
#    b.invoke('http://www.verycd.com/sto/feed')
    start_response('200 OK', [('Content-Type', 'text/html')])
    return ["<b>hello world</b>"]

from core.task import TaskPool
t = TaskPool()
t.fork('http://www.verycd.com/sto/feed', 5, True)

print 'Serving on 8080...'
wsgi.WSGIServer(('', 8080), hello_world).serve_forever()
